/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package fr.ove.openmath.jome.ctrlview.bidim;

/**
 *
 * @author Mr.Sam
 */
import java.awt.*;
import java.util.*;
import fr.ove.openmath.jome.ctrlview.bidim.*;
import fr.ove.openmath.jome.ctrlview.bidim.selection.events.*;
import fr.ove.openmath.jome.model.*;

/**
* A layout manager for an infix operator which symbol is ",".<BR>
* In fact, his is not an operator. This layout manager will only serve for specific operators
* which need to separate their operands with "," (e.g. lists, enumeration, ...)
*
* @author © 1999 DIRAT Laurent
* @version 2.0  15/12/1999
*/
public class SeparatorOperatorLayout extends StringInfixOperatorLayout {    
    /**
    * Returns the display of the operator
    */
    public Display createOperatorDisplay() {
        // Ce n'est pas un opérateur en tant que tel, donc pas de fts associé, on spécifie donc directement
        // ce qui est censé représenter l'opérateur : ","
        StringDisplay stringDisplay = new StringDisplay(displayToLay.getGraphicContext(), ",", true);
        stringDisplay.setIsSymbolOperatorDisplay(true);
        
        return stringDisplay;
    }
    
    /**
    * Checks the validity of the selection.
    */
    public void validateSelection() {
        // Pour le moment, on fait rien
    }
    
    /**
    * Checks the validity of the deselection.
    * @param display the display to deselect.
    */
    public void validateDeselection(Display display) {
        // Pour le moment, on fait rien
    }
}